package com.dhecp.project.api.service;

import com.dhecp.project.api.domain.ApiResponse;
import java.util.Map;

/**
 * @ClassName Api1688Service
 * @Description TODO
 * @Author alula
 * @Date 2022-08-26 17:01
 */
public interface Api1688Service {

    /**
     * 通过code换取1688 accessToken
     * @param code
     * @return
     */
    ApiResponse get1688Token(String code);

    /**
     * 获取刷新后的token
     * @return
     */
    String getRefreshAccessToken();

    /**
     * 获取1688产品相关数据
     * @param system
     * @param type
     * @param dataParams  格式为{"productNos":"EE921102901,EE921102902","uersId":"0000"}
     * @return
     */
    ApiResponse get1688ProductDetail(String system, String type,Map<String, Object> dataParams);

    /**
     * 创建1688采购订单
     * @param system
     * @param type
     * @param dataParams 格式为{"orderNos":"PO-220831-000001,PO-220831-000002","userId":"0000"}
     * @return
     */
    ApiResponse create1688Order(String system, String type, Map<String, Object> dataParams);

    /**
     *
     * @param system
     * @param type
     * @param dataParams 格式为{"orderNos":"PO-220831-000001,PO-220831-000002","userId":"0000","cancelReason":""}
     * @return
     */
    ApiResponse cancel1688Order(String system, String type, Map<String, Object> dataParams);

    /**
     * 获取1688采购订单详细信息
     * @param dataParams 格式为{"orderNo":"PPO-220831-000002","userId":"0000"}
     * @return
     */
    ApiResponse get1688OrderDetail(String system, String type, Map<String, Object> dataParams);

    /**
     * 获取1688采购订单物流信息
     * @param system
     * @param type
     * @param dataParams 格式为{"orderNo":"PPO-220831-000002","userId":"0000"}
     * @return
     */
    ApiResponse get1688OrderLogisticsInfo(String system, String type, Map<String, Object> dataParams);

    /**
     * 获取1688采购订单物流跟踪信息
     * @param system
     * @param type
     * @param dataParams 格式为{"orderNo":"PPO-220831-000002","userId":"0000"}
     * @return
     */
    ApiResponse get1688OrderTraceInfo(String system, String type, Map<String, Object> dataParams);

    /**
     * 获取1688支付URL地址
     * @param system
     * @param type
     * @param dataParams
     * @return
     */
    ApiResponse get1688AlipayUrl(String system, String type, Map<String, Object> dataParams);

    /**
     * 1688PUSH的消息处理
     * @param system
     * @param type
     * @param dataParams
     * @return
     */
    ApiResponse push1688Message(String system, String type, Map<String, Object> dataParams);

}
